package org.dey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.dey.pojo.Member;
import org.dey.pojo.Order;
import org.dey.pojo.RenQunFenLei;
import org.dey.pojo.VisitDiary;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface VisitDiaryMapper extends BaseMapper<VisitDiary> {

    @Select("SELECT user_id FROM t_user_role WHERE role_id=2")
    public List<Integer> queryallUserRole();

    @Select("select o.* from renqunfenlei o inner join t_member m on o.member=m.id where o.zhuangtai='已干预'")
    public List<RenQunFenLei> getmid();

    @Select("update renqunfenlei set zhuangtai = '已随访' where id=#{value}")
    public boolean setstatus(int id);

    @Select("select m.* from renqunfenlei o inner join t_member m on o.member=m.id where o.id=#{value}")
    public Member getmember(int oid);
}
